import request from '../index'
import {IPage} from '../user/index'
interface ISourceData {
    Id?:string,
    name:string,
    environment:string,
    period:string,
    amount:string,
    date:string
}

// 食品基本信息查询
export function getGoodPro(pageConfig:IPage,name?:string) {
    return request({
        url:"good/product",
        data:{
            name,
            pageConfig
        }
    })
}

// 食品基本信息添加
export function addGoodPro(sourceData:ISourceData) {
    return request({
        url:"good/product/add",
        data:sourceData
    })
}
// 食品基本信息编辑
export function editGoodPro(sourceData:ISourceData) {
    return request({
        url:"good/product/edit",
        data:sourceData
    })
}
// 食品基本信息删除
export function deleteGoodPro(Id:number) {
    return request({
        url:"good/product/delete",
        data:{
            Id:Id
        }
    })
}